<ion-header style="position: fixed;top:0;z-index: 200;width: 100%;text-align: center;">
  <ion-navbar color="mainColor">
    <ion-title>问卷调查</ion-title>
  </ion-navbar>

</ion-header>
<div padding [style.padding-bottom.px]="0" style="padding-bottom: 0px;position: fixed;top:55px;z-index: 200;width: 100%;background-color: white;">

  <ion-segment [(ngModel)]="questionStatus" color="mainColor">

    <ion-segment-button value="on">
      <span>进行中</span>
    </ion-segment-button>
    <ion-segment-button value="over">
      已结束
    </ion-segment-button>
    <ion-segment-button value="not">
      未下载
    </ion-segment-button>
  </ion-segment>
</div>
<!-- <div style="height:65px;"></div> -->
<ion-content style="padding-top:0;     margin-top: 56px;">

  <!-- -->
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="下拉刷新" refreshingSpinner="circles" refreshingText="正在刷新...">
    </ion-refresher-content>
  </ion-refresher>
  <div [ngSwitch]="questionStatus">

    <ul *ngSwitchCase="'on'">
      <li *ngFor="let n of this.onQuestionnaire;let i=index;">
        <div class="question-info">
          <p>
            {{n.FTitle}}
          </p>
          <span class="active">
            {{n.fenshu?n.fenshu:0}}份
            <span class="geng" *ngIf="n.gengx">更</span>
          </span>
          <div>
            <span>发布时间: {{n.FPublishTime.substr(0,9)}}</span>
            <span>截止时间: {{n.FEndNumOrTime.split(',')[1]?(n.FEndNumOrTime.split(',')[1].substr(0,9)):'-'}}</span>
            <ion-icon [ngClass]="{'rotate': show[i]}" (click)="showControl(i)" name="arrow-up"></ion-icon>
          </div>
        </div>
        <div class="question-control" *ngIf="show[i]">
          <span (click)="questionnaireAnswers(n.FQId,'z','i')">
            <ion-icon name="clipboard"></ion-icon>作答
          </span>
          <span (click)="recycli(n.FQId)">
            <ion-icon name="sync"></ion-icon>回收
          </span>
          <span (click)="proceedpath(n.FQId,n.fenshu,n.FTitle)">
            <ion-icon name="compass"></ion-icon>轨迹
          </span>
          <span (click)="OnDelete(i,n)">
            <ion-icon name="trash"></ion-icon>删除
          </span>
          <span *ngIf="n.gengx" (click)="gengxinfun(n)">
            <ion-icon name="refresh"></ion-icon>更新
          </span>
        </div>
      </li>
    </ul>
    <ul *ngSwitchCase="'over'">
      <li *ngFor="let o of this.OverListArray;let i=index;" [ngStyle]="{'display':o.isdel==false ?'block':'none' }">
        <div class="question-info">
          <p>
            {{o.FTitle}}
          </p>
          <span class="active">
            {{o.fenshu}}份
          </span>
          <div>
            <span>发布时间: {{o.FPublishTime.substr(0,9)}}</span>
            <span [ngStyle]="{'display':o.jztype=='sj' ?'inline':'none' }">截止时间</span>
            <span [ngStyle]="{'display':o.jztype=='fs' ?'inline':'none' }">截止数量</span>
            <span>: {{o.jz}}</span>
            <ion-icon [ngClass]="{'rotate': show[i]}" (click)="showControl(i)" name="arrow-up"></ion-icon>
          </div>
        </div>
        <div class="question-control" *ngIf="show[i]">
          <span (click)="OverView()">
            <ion-icon name="search"></ion-icon>查看
          </span>
          <span (click)="OverPath(o.FQId,o.fenshu)">
            <ion-icon name="compass"></ion-icon>轨迹
          </span>
          <span (click)="OnDeleteOver(i,o)">
            <ion-icon name="trash"></ion-icon>删除
          </span>
        </div>
      </li>
    </ul>
    <ul *ngSwitchCase="'not'">
      <li *ngFor="let n of this.list;let i=index;">
        <div class="question-info">
          <p id="kk">
            {{n.FTitle}}
          </p>
          <div>
            <span>发布时间: {{n.FPublishTime.substr(0,9)}}</span>
            <span>截止时间: {{n.FEndNumOrTime.split(',')[1]?(n.FEndNumOrTime.split(',')[1].substr(0,9)):'-'}}</span>
            <!--<ion-icon [style.font-size.px]="24" [style.margin-top.px]="-19" name="pause"></ion-icon>-->
            <ion-icon [style.font-size.px]="24" [style.margin-top.px]="-19" [name]="n.icon" (click)="tabDowmloadIcon(n)"></ion-icon>
            <ion-icon [style.font-size.px]="24" [style.margin-top.px]="-19" name="search" (click)="questionnaireAnswers(n.FQId,'y',i)"></ion-icon>
          </div>
        </div>
      </li>
    </ul>
  </div>





  <div style="height: 52px"></div>
</ion-content>
